package com.bestcem.xm.common.core.grpcplatform.entity;

import com.bestcem.xm.common.core.enums.SearchMatchEnum;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;

/**
 * @author sh.pei <sh.pei@idiaoyan.com>
 * @version v1.0
 * @date 2021/7/21 17:54
 */
@Getter
@Setter
@NoArgsConstructor
@ToString
public class ListGrpcPlatformsParam {

    /**
     * 当前页
     */
    @Min(value = 1, message = "当前页无效")
    protected int page = 1;

    /**
     * 分页大小
     */
    @Min(value = 1, message = "分页大小错误")
    protected int size = 20;

    /**
     * code值
     */
    @NotEmpty(message = "code值不能为空")
    private String code;

    /**
     * 是否精确查询 默认精确搜索
     */
    private int accurate = SearchMatchEnum.EXACT.getIndex();
}
